/* 
 *  javascribd - Java client library for the Scribd API. 
 *  Copyright (C) 2009 by Marcel Eyke, http://code.google.com/p/javascribd/ 
 *  Use is subject to license terms of LGPL. See license.txt. 
 */
package com.google.code.javascribd.connection.jaxbadapter;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import com.google.code.javascribd.type.ApiKey;

public class ApiKeyAdapter extends XmlAdapter<String, ApiKey> {

	@Override
	public String marshal(ApiKey apiKey) throws Exception {
		return apiKey.toString();
	}

	@Override
	public ApiKey unmarshal(String apiKeyString) throws Exception {
		return new ApiKey(apiKeyString);
	}

}
